1. Field of the Invention
This invention relates to an image generation apparatus for generating an image as seen from a given viewpoint within an object space, and an information storage medium used therefor.
2. Description of Related Art
An image generation apparatus is known in the art for disposing a plurality of display objects within an object space, which is a virtual three-dimensional space, and generating an image as seen from a given viewpoint within that object space. This is also highly popular for enabling players to experience a virtual reality. In a driving game, which is an example of such an image generation apparatus, a player manipulates a vehicle to cause it to travel over a course within an object space, to enjoy a three-dimensional game.
However, in three-dimensional games up until the present, there has been absolutely no consideration of the effects on a moving body of the flow of a fluid such as water on the course. This means that the behavior of the moving body manipulated by the player is not influenced by the flow of the fluid. It has therefore not been possible to further increase the realism, fascination, and excitement of such a game.
This invention was devised in order to solve the above technical problem, and has as an objective thereof the provision of an image generation apparatus and an information storage medium that make it possible for the flow of a fluid over a course to influence the behavior of the moving body.
In order to solve the above described technical problems, this invention provides an image generation apparatus for generating an image at a given viewpoint within an object space, the image generation apparatus comprising: means for causing a moving body to move over a course within the object space, based on manipulation data that is input from a manipulation means and flow data for a fluid that is set along the course; and means for generating an image as seen from a given viewpoint within the object space, which is an image comprising an image of the course.
The moving body moves along a course within the object space, based on manipulation data from the manipulation means. In addition, the position and direction of the moving body is determined in accordance with this invention from flow data for a fluid such as water. This makes it possible for the flow of the fluid over the course to influence the behavior of the moving body. As a result, it is possible to represent a moving body such as a boat on the course of a river as it passes down the river, enabling the implementation of a type of three-dimensional game that does not exist in the prior art.
A flow-velocity vector at the position of the moving body may be obtained by interpolation based on flow data that is set for a first array of sample points on the course and position data for the moving body, the moving body being moved in accordance with the thus-obtained flow-velocity vector. In this case, the flow data could be comprised of data such as position of sample points, flow velocity, and flow direction. With this invention, the flow-velocity vector at the position of the moving body is obtained on the basis of the flow data at these sample points and position data for the moving body. During this process, the flow-velocity vector is obtained by interpolation that is either linear or along an M-dimensional curve (such as a quadratic or cubic curve). Since only the first array of sample points requires the provision of flow data, it enables a huge reduction in the storage capacity necessary for holding the flow data and also the work required for inputting the data.
The flow data may comprise a first flow velocity that is the maximum flow velocity within a course cross-section; and interpolation on a left side of a line linking the first array of sample points may be based on the first flow velocity and a second flow velocity at a left edge of the course, whereas interpolation on a right side of the line linking the first array of sample points may be based on the first flow velocity and a third flow velocity at a right edge of the course. This makes it possible to represent the flow of the fluid over a course in a manner that is close to that in the real world. It also tends to simplify the interpolation calculations for obtaining the flow-velocity vector.
The second and third flow velocities may be each greater than zero. This makes it possible to prevent the flow velocity at the left and right edges of the course from becoming too small.
The flow data may be set for the first array of sample points to be in a one-to-one correspondence with course data that is set for a second array of sample points on the course. This makes it possible to read out both the flow data and the course data by a single argument, enabling the design of a simpler data structure and processing.